package com.applabs.dnd.core;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class DNDMeRebootListener extends BroadcastReceiver {
	
	private final String TAG="DNDApp";

	@Override
	public void onReceive(Context context, Intent intent) {
		DNDManager dndManager = DNDManager.getInstance(context);
		boolean bEnabled = dndManager.isServiceEnabled();
		Log.d(TAG, "onReceive entry: "+bEnabled);
		if(bEnabled)
		{
			Log.d(TAG,"Enabling DND on Boot");
			Intent startServiceIntent = new Intent(context, DNDMeService.class);
	        context.startService(startServiceIntent);
		}

	}

}
